/* 全局样式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  color: #1f2937;
  background-color: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #111827;
    color: #f3f4f6;
  }
}

/* 应用容器样式 */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 内容区域样式 */
.main-content {
  flex: 1;
  padding: 24px;
  background-color: #f8fafc;
  transition: all 0.3s ease;
}

/* 响应式内容区域 */
@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }
}

/* 卡片样式 - 现代化设计 */
.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
  padding: 24px;
  margin-bottom: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1890ff, #52c41a);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
  border-color: rgba(24, 144, 255, 0.1);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f9ff;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 0;
}

/* 暗色模式卡片样式 */
@media (prefers-color-scheme: dark) {
  .main-content {
    background-color: #111827;
  }
  
  .card {
    background: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
  
  .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .card-title {
    color: #f3f4f6;
  }
}

/* 按钮样式增强 */
.btn-primary {
  background-color: #1890ff;
  border-color: #1890ff;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #40a9ff;
  border-color: #40a9ff;
}

.btn-danger {
  background-color: #ff4d4f;
  border-color: #ff4d4f;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #ff7875;
  border-color: #ff7875;
}

.btn-success {
  background-color: #52c41a;
  border-color: #52c41a;
  color: #ffffff;
}

.btn-success:hover {
  background-color: #73d13d;
  border-color: #73d13d;
}

.btn-warning {
  background-color: #faad14;
  border-color: #faad14;
  color: #ffffff;
}

.btn-warning:hover {
  background-color: #ffc53d;
  border-color: #ffc53d;
}

/* 表单样式 */
.form-item {
  margin-bottom: 16px;
}

.form-label {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #303133;
}

/* 表格样式增强 */
.table-container {
  overflow-x: auto;
}

/* 加载状态样式 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #909399;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
  margin-bottom: 8px;
}

.empty-state-subtext {
  font-size: 12px;
  opacity: 0.7;
}

/* 分页样式 */
.pagination-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* 风险等级标签样式 */
.risk-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.risk-high {
  background-color: #fff1f0;
  color: #ff4d4f;
  border: 1px solid #ffccc7;
}

.risk-medium {
  background-color: #fffbe6;
  color: #fa8c16;
  border: 1px solid #ffe58f;
}

.risk-low {
  background-color: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}

.risk-info {
  background-color: #e6f7ff;
  color: #1890ff;
  border: 1px solid #91d5ff;
}

/* 工具提示样式增强 */
.tooltip {
  z-index: 2000;
}

/* 徽章样式 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary {
  background-color: #1890ff;
  color: #ffffff;
}

.badge-success {
  background-color: #52c41a;
  color: #ffffff;
}

.badge-warning {
  background-color: #faad14;
  color: #ffffff;
}

.badge-danger {
  background-color: #ff4d4f;
  color: #ffffff;
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.tag-gray {
  background-color: #f5f5f5;
  color: #666666;
}

.tag-blue {
  background-color: #e6f7ff;
  color: #1890ff;
}

.tag-green {
  background-color: #f6ffed;
  color: #52c41a;
}

.tag-yellow {
  background-color: #fffbe6;
  color: #faad14;
}

.tag-red {
  background-color: #fff1f0;
  color: #ff4d4f;
}

/* 动画效果 */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
  opacity: 0;
}

.slide-enter-active, .slide-leave-active {
  transition: transform 0.3s ease;
}

.slide-enter-from {
  transform: translateX(-20px);
  opacity: 0;
}

.slide-leave-to {
  transform: translateX(20px);
  opacity: 0;
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: #1890ff;
}

.text-success {
  color: #52c41a;
}

.text-warning {
  color: #faad14;
}

.text-danger {
  color: #ff4d4f;
}

.text-muted {
  color: #909399;
}

.font-bold {
  font-weight: 600;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.mb-4 {
  margin-bottom: 32px;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 32px;
}

.ml-0 {
  margin-left: 0;
}

.ml-1 {
  margin-left: 8px;
}

.ml-2 {
  margin-left: 16px;
}

.ml-3 {
  margin-left: 24px;
}

.ml-4 {
  margin-left: 32px;
}

.mr-0 {
  margin-right: 0;
}

.mr-1 {
  margin-right: 8px;
}

.mr-2 {
  margin-right: 16px;
}

.mr-3 {
  margin-right: 24px;
}

.mr-4 {
  margin-right: 32px;
}

.p-0 {
  padding: 0;
}

.p-1 {
  padding: 8px;
}

.p-2 {
  padding: 16px;
}

.p-3 {
  padding: 24px;
}

.p-4 {
  padding: 32px;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.align-center {
  align-items: center;
}

.align-start {
  align-items: flex-start;
}

.align-end {
  align-items: flex-end;
}

.flex-1 {
  flex: 1;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.overflow-auto {
  overflow: auto;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .main-content {
    padding: 12px;
  }
  
  .card {
    padding: 16px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .d-flex {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 12px;
  }
  
  .main-content {
    padding: 8px;
  }
  
  .card {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .card-title {
    font-size: 16px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
  
  .main-content {
    background-color: #1a1a1a;
  }
  
  .card {
    background-color: #2d2d2d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  
  .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }
  
  .card-title {
    color: #e0e0e0;
  }
  
  .card-header {
    border-bottom-color: #404040;
  }
  
  .form-label {
    color: #e0e0e0;
  }
  
  /* 覆盖Element Plus的深色模式样式 */
  .el-input__inner {
    background-color: #3d3d3d;
    border-color: #5d5d5d;
    color: #e0e0e0;
  }
  
  .el-select .el-input__inner {
    background-color: #3d3d3d;
    border-color: #5d5d5d;
    color: #e0e0e0;
  }
  
  .el-table {
    background-color: #2d2d2d;
  }
  
  .el-table th {
    background-color: #3d3d3d;
    color: #e0e0e0;
    border-bottom-color: #5d5d5d;
  }
  
  .el-table tr {
    background-color: #2d2d2d;
    color: #e0e0e0;
  }
  
  .el-table tr:hover > td {
    background-color: #404040;
  }
  
  .el-table__row--striped td {
    background-color: #333333;
  }
  
  .el-divider {
    background-color: #5d5d5d;
  }
  
  .el-dialog {
    background-color: #2d2d2d;
    color: #e0e0e0;
  }
  
  .el-dialog__header {
    border-bottom-color: #5d5d5d;
  }
  
  .el-dialog__title {
    color: #e0e0e0;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 深色模式下的滚动条样式 */
@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-track {
    background: #3d3d3d;
  }
  
  ::-webkit-scrollbar-thumb {
    background: #5d5d5d;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: #6d6d6d;
  }
}

/* 打印样式 */
@media print {
  .no-print {
    display: none !important;
  }
  
  .main-content {
    padding: 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #e8e8e8;
    page-break-inside: avoid;
  }
  
  .pagination-container {
    display: none;
  }
}